<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../vue.js"></script>
</head>
<body>
    <div id="app">
        <!-- 利用点击按钮 使属性发生变化从而改变显示的列表 -->
        <button @click="msg=true">登录</button>
        <button @click="msg=false">注册</button>

        <form action=""  v-if="msg">
            <input type="text" placeholder="请登录">
            <input type="text">
        </form>
        <form action=""  v-else>
            <input type="text" placeholder="请注册">
            <input type="text">
        </form>


    </div>
    <script>
        const vm = new Vue({
            el:"#app",
            data(){
                return {
                    msg:true
                }
            }
        })
    </script>
</body>
</html>